package com.myproject.mall.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.myproject.mall.domain.enums.CouponRuleType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


@TableName("scmall_coupon_rule")
@Schema(description = "优惠券规则")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CouponRule {
    @Schema(description = "优惠券规则ID")
    @TableId(value = "rule_id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "优惠券ID")
    @TableField(value = "rule_coupon_id")
    private Integer couponId;

    @Schema(description = "优惠券规则类型")
    @TableField(value = "rule_type")
    private CouponRuleType type;


    /**
     * 优惠券规则值
     * category_id, shop_id, goods_id, brand_id
     */
    @Schema(description = "优惠券规则值")
    @TableField(value = "rule_value")
    private Long value;
}
